<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>	
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<s:head theme="ajax"/>
<style type="text/css">
hr {
	margin-bottom: 0px;
	margin-top: 0px;
}
</style>
</head>
<body>
	<center>
		<table border="0" width="700">
			<tr>
				<td align="left">
					<s:url id="prevURL" action="listday" namespace="/commute">
						<s:param name="sdate">
							<s:date name="prevday" format="yyyy-MM-dd"/>
						</s:param>
					</s:url>
					<s:a href="%{prevURL}" theme="ajax" targets="commcon">
						<s:date name="prevday" format="yyyy-MM-dd"/>
					</s:a>
					&nbsp;◀&nbsp;
					<s:date name="today" format="yyyy-MM-dd"/>
					&nbsp;▶&nbsp;
					<s:url id="nextURL" action="listday" namespace="/commute">
						<s:param name="sdate">
							<s:date name="nextday" format="yyyy-MM-dd"/>
						</s:param>
					</s:url>					
					<s:a href="%{nextURL}" theme="ajax" targets="commcon">
						<s:date name="nextday" format="yyyy-MM-dd"/>
					</s:a>
					&nbsp;
					<s:url id="todayURL" action="listday" namespace="/commute">
						<s:param name="sdate" value="newd"/>
					</s:url>											
					<s:a href="%{todayURL}" theme="ajax" targets="commcon">
						<img src="/ssteam/image/commute/butt_day.png" border="0" align="middle">
					</s:a>
				</td>
			</tr>
		</table>
		<br>
		<table border="0" width="700">
			<tr>
				<th colspan="4"><hr color="#5B8ED9"></th>
			</tr>
			<tr>
				<th align="center" width="25%">
					사번
				</th>
				<th align="center" width="25%">
					출근
				</th>
				<th align="center" width="25%">
					퇴근
				</th>
				<th align="center" width="25%">
					근무시간(시간)
				</th>
			</tr>
			<tr>
				<td colspan="4"><hr color="#D7D7D7"></td>
			</tr>			
			<s:iterator value="listd">
			<tr onmouseover="this.style.backgroundColor='#eaf0fa'" onmouseout="this.style.backgroundColor=''">
				<td>${sabun }</td>
				<td><s:date name="cwork" format="HH:mm"/></td>
				<td><s:date name="lwork" format="HH:mm"/></td>				
				<td>${(worktime*24)-((worktime*24)%1) }</td>				
			</tr>
			<tr>
				<td colspan="4"><hr color="#D7D7D7"></td>
			</tr>			
			</s:iterator>
		</table>
		<table border="0" width="700">
			<tr>
				<td width="50%" align="right">
					<c:forEach begin="1" end="${totalpage }" step="1" var="i">						
						<s:url id="commPageURL" action="listday" namespace="/commute">						
							<s:param name="sabun">${session.user.sabun }</s:param>
							<s:param name="curpage">${i }</s:param>
						</s:url>
						<c:choose>
							<c:when test="${curpage == i }">
								<font color="black">[${i }]&nbsp;</font>
							</c:when>
							<c:otherwise>
								<s:a href="%{commPageURL}" theme="ajax" targets="commcon">
								[${i }]
								</s:a>
								&nbsp;
							</c:otherwise>
						</c:choose>							
					</c:forEach>					
				</td>
				<td width="50%" align="left">
					${curpage } / ${totalpage } 페이지
				</td>
			</tr>
		</table>
		<hr width=700>
	</center>
</body>
</html>